package com.sx.baseproject.framework.net;


import androidx.annotation.NonNull;

import com.example.mvvm.rx.RxTimer;
import com.example.mvvm.rx.RxUtils;
import com.sx.baseproject.BuildConfig;

import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;

public abstract class ApiResource {

/*    public <T> Observable<T> just(T t) {
        return Observable.create(new ObservableOnSubscribe<T>() {
            @Override
            public void subscribe(@NonNull ObservableEmitter<T> emitter) throws Exception {
                new RxTimer().timer(500, new RxTimer.RxAction() {
                    @Override
                    public void action(long number) {
                        emitter.onNext(t);
                        emitter.onComplete();
                    }
                });
            }
        }).compose(RxUtils.schedulersTransformer());
    }*/

    public String getApi(String api) {
        return "https://www.usiji.cn" + api;
    }

}